package com.klikmee.sms.core.base.communicator.mtel;

import com.klikmee.sms.core.base.resolvers.AbstractServiceResolver;
import com.klikmee.sms.core.model.IncomingMessage;
import com.klikmee.sms.core.model.Service;

/**
 * Service resolver implementation for MTel provider.  
 *
 */
public class MTelMessage2ServiceResolver extends AbstractServiceResolver {

	/**
	 * Matches incoming message to the service by comparing MTel short code
	 * @param incomingMessage message to be matched to the service
	 * @param service service definition to test for match
	 * 
	 * @return true if service matches, otherwise false
	 */
	@Override
	protected boolean matchProviersShortCode(IncomingMessage incomingMessage, Service service) {
		
		return incomingMessage.getToNumber().matches(service.getmTelShortCode());
	}

}
